<script setup lang="ts">
import { useUserStore } from './common/store'
import { WebSocketUtil, routeInterception } from '@/common/utils'

onLaunch(async () => {
  const { hope_user_info } = useUserStore()
  if (hope_user_info && hope_user_info.id) {
    // 连接websocket
    await WebSocketUtil.initSocket(`ws://127.0.0.1:8080/ws/${hope_user_info?.id}`)
  }
})
onLoad(() => {

})

onShow(() => {
  routeInterception()
})
</script>

<style lang="scss">
/* @import "./style/common-style.scss"; */

page {
    height: 100%;
    background: linear-gradient(210.76deg, rgba(237, 69, 86, 1) 0%, rgba(237, 69, 86, 0) 100%), linear-gradient(135deg, rgba(237, 69, 86, 1) 0%, rgba(237, 69, 86, 0) 100%);

}

/**文本一行显示 溢出隐藏 */
.ellipsis-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    ;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.bg-skeleton {
    background-color: $color-skeleton;
}

.text-skeleton {
    color: $color-skeleton;
}

/**文本两行显示 溢出隐藏 */
.ellipsis-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    ;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

:deep(.uni-title__box) {
    padding: 0 !important;
}

:deep(.uni-load-more) {
    background-color: $color-white;
}

button {
    padding: 0;
}

#routeMap {
    flex: auto !important
}

/**腾讯地图样式 */
.routeplan-page {
    padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
    padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
}

.uni-section .uni-section-header__decoration.line {
    background: $color-primary !important;
}

.uni-easyinput__content-input {
    font-size: $font-size-base !important;
}

.uni-easyinput__placeholder-class {
    font-size: $font-size-base !important;
}

//日历图片样式修改
.uniui-calendar {
    font-size: $font-size-lg !important;
}

.icon-calendar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80rpx !important;
    height: 80rpx !important;
}

// 输入框右侧图片样式
.content-clear-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

// map 图片样式,
.uniui-map-filled {
    font-size: 60rpx !important;
    color: $color-primary !important;
}

text {
    font-size: $font-size-base;
}
</style>
